How To Make In-Game Cutscenes
SetActorAIState Sets the state of the actor, Like attacking, holding, patroling or following owner Syntax: SetActorAIState(Actor Handler, State) 0 - Wait in current position, attack any valid targets who come into range 1 - Patrol - walk to destination, then set destination to new waypoint if available 2 - Run - same as Patrol but running instead of walking 3 - Chase and attack target 4 - For actors who are paused at a waypoint while on patrol 5 - Pet mode - actor will follow leader and attack leader's target (actor MUST have a leader to use this) 6 - Pet attack mode - actor is chasing and attacking the leader's target 7 - Pet wait mode - actor waits in current position and does absolutely nothing BubbleOutput Makes the npc / player say something. Syntax: BubbleOutput(Actor Handler, Text as String) SetActorTarget Sets an actors target Syntax: SetActorTarget(Actor Handler, Actor Handler) DoEvents Creates a delay, Used for the timing Syntax: DoEvents(Milisecs as Integer) SetActorDestination Sets the actors next destination, The actor will walk to their destination Syntax: SetActorDestination(Actor Handler, X as Integer, Z as Integer) Spawn This one is advanced, It spawns an actor but also has the possibility to create the handler for that actor. Syntax: Spawn(ActorID, ZoneName, X, Y, Z, RightClickScript, DeathScript, Instance) Sample: NPCID = ActorID("Race", "Class") NPCZ = Spawn(NPCID, "ZoneName", 13, 5, 13) SetName(NPCZ, "Test NPC") Those are useful and bare them in mind Ok, I do not know, Or care how you might decide to do the instancing, But the way i do is with the command: SQLAccountID(Actor()) And use the int returned from that, but it is optional. First step is: Make an actor and make a model with absolutely NO faces Then set the model as the actors model. Second step is Make the zone you wish to be the cutscenes zone. Do NOT spawn ANY waypoints for npcs, As you can not control them like that (Well i dont think so). Third step is: Create a script with the codes above and any codes like ScreenFlash to make it more realistic. Make it turn the player in to the invisible actor with a combo of SetActor(Actor Handler, ActorID as Actor ID) and ActorID("Race", "Class"). Make it create an instanced zone where you want it to warp them then make it warp them when instanced. I do recommend using a screen flash for about 4 seconds whilst it loads up. Below is my sample cutscene used by nearly pure scripting (It is indeed possible without source edits xD). Using "RC_Core.rcm" ; AvatarScape ; Date/Time: 21:08:12 on 09/08/2009 ; By Fabian on FABIAN-PC Function Main() ZoneName = "Zone Name" Portal = "Portal Name" ID = ActorID("Invisible", "None") NPCID = ActorID("Fire Nation", "Soldier") Watcher = Actor() CreateZoneInstance(ZoneName, SQLAccountID(Watcher)) OldID = ActorIDFromInstance(Watcher) ChangeActor(Watcher, ID) ; Makes character invisible NPC = Spawn(NPCID, ZoneName, 5, 5, 5, Nothing, Nothing, SQLAccountID(Watcher)) ; Spawns the actor SetName(NPC, "NPC number 1") OldZone = ActorZone(Watcher) OldZ = ActorZ(Watcher) OldY = ActorY(Watcher) OldX = ActorX(Watcher) ScreenFlash(Watcher, 0, 0, 255, 255, 3000, 65535) Warp(Watcher, ZoneName, Portal, SQLAccountID(Watcher)) ; Warps to instanced zone SetLeader(Watcher, NPC) ; Makes the watcher camera follow the npc BubbleOutput(NPC, "Hello, This is an example cutscene.") DoEvents(1500) BubbleOutput(NPC, "I think i will walk to X: 10 Z: 13") DoEvents(1500) SetActorDestination(NPC, 10, 13) DoEvents(1500) NPCZ = Spawn(NPCID, ZoneName, 13, 5, 13, Nothing, Nothing, SQLAccountID(Watcher)) ; Spawn NPC 2 SetName(NPCZ, "NPC number 2") DoEvents(1000) BubbleOutput(NPCZ, "I feel like attacking somebody just like me") DoEvents(1500) SetActorTarget(NPCZ, NPC) ; Makes the second NPC set their target SetActorAIState(NPCZ, 3) ; Makes the second NPC attack BubbleOutput(NPC, "Why are you attacking me??") DoEvents(1500) BubbleOutput(NPCZ, "I feel like it.....") DoEvents(20000) BubbleOutput(NPC, "Thats for all Realm Crafter community members") BubbleOutput(NPCZ, "Thats for all Realm Crafter community members") DoEvents(1000) ScreenFlash(Watcher, 0, 0, 255, 255, 3000, 65535) SetLeader(Watcher, 0) Warp(Watcher, ZoneName, Portal) OldSpeed = Attribute(Watcher, "Speed") SetAttribute(Watcher, "Speed", 15000) SetActorDestination(Watcher, OldX, OldZ) SetAttribute(Watcher, "Speed", OldSpeed) RemoveZoneInstance(ZoneName, SQLAccountID(Watcher)) End Function Oh yes, you also want it to warp them directly back to where they were, Check out my script to see how because otherwise they just get warped back to the zone. Oh and use things like SetActor Hair Beard Clothes Face to make the npcs the ones you want Also helpful KillActor CreateEmitter ----All quest commands---- Here is an example cutscene. Using "RC_Core.rcm" ; AvatarScape ; Date/Time: 21:08:12 on 09/08/2009 ; By Fabian on FABIAN-PC Function Main() ZoneName = "Cutscene" Portal = "Start" ID = ActorID("Invisible", "None") NPCID = ActorID("Fire Nation", "Soldier") Watcher = Actor() CreateZoneInstance(ZoneName, SQLAccountID(Watcher)) OldID = ActorIDFromInstance(Watcher) ChangeActor(Watcher, ID) ; Makes character invisible Watcher = Actor() NPC = Spawn(NPCID, ZoneName, 5, 5, 5, Nothing, Nothing, SQLAccountID(Watcher)) ; Spawns the actor SetName(NPC, "NPC number 1") OldZone = ActorZone(Watcher) OldZ = ActorZ(Watcher) OldY = ActorY(Watcher) OldX = ActorX(Watcher) ScreenFlash(Watcher, 0, 0, 255, 255, 3000, 65535) Warp(Watcher, ZoneName, Portal, SQLAccountID(Watcher)) ; Warps to instanced zone SetLeader(Watcher, NPC) ; Makes the watcher camera follow the npc BubbleOutput(NPC, "Hello, This is an example cutscene.") DoEvents(1500) BubbleOutput(NPC, "I think i will walk to X: 10 Z: 13") DoEvents(1500) SetActorDestination(NPC, 10, 13) DoEvents(1500) NPCZ = Spawn(NPCID, ZoneName, 13, 5, 13, Nothing, Nothing, SQLAccountID(Watcher)) ; Spawn NPC 2 SetName(NPCZ, "NPC number 2") DoEvents(1000) BubbleOutput(NPCZ, "I feel like attacking somebody just like me") DoEvents(1500) SetActorTarget(NPCZ, NPC) ; Makes the second NPC set their target SetActorAIState(NPCZ, 3) ; Makes the second NPC attack BubbleOutput(NPC, "Why are you attacking me??") DoEvents(1500) BubbleOutput(NPCZ, "I feel like it.....") DoEvents(20000) BubbleOutput(NPC, "Thats for all Realm Crafter community members") BubbleOutput(NPCZ, "Thats for all Realm Crafter community members") DoEvents(1000) ScreenFlash(Watcher, 0, 0, 255, 255, 3000, 65535) Warp(Watcher, ZoneName, Portal) OldSpeed = Attribute(Watcher, "Speed") SetAttribute(Watcher, "Speed", 15000) SetActorDestination(Watcher, OldX, OldZ) SetAttribute(Watcher, "Speed", OldSpeed) RemoveZoneInstance(ZoneName, SQLAccountID(Watcher)) End Function To stop a enemy from moving for a short time u can use this script: Function Main Player = Actor() Targer = ContextActor() TargetSpeed = Attribute(Target, "Speed") SetAttribute(Target, "Speed", 0) DoEvent(10000); Delay of 10 Seconds (1000 * # of Seconds Delay) SetAttribute(Target, "Speed", TargetSpeed) Return End Function (UUICEO helped me with this script a while ago) if u want to warp the player back to the previous zone at the sme time the actor immobility ends, use it like this: Function Main Player = Actor() Targer = ContextActor() TargetSpeed = Attribute(Target, "Speed") SetAttribute(Target, "Speed", 0) DoEvent(10000); Delay of 10 Seconds (1000 * # of Seconds Delay) SetAttribute(Target, "Speed", TargetSpeed) Spawn(Player, "Zone name", "Portal name") Return End Function Original Post by Avatarscape 4/May/2009